@extends('backstage.layout.master')
@section('title', '管理员列表')
@section('style')

@stop
@section('content')
    <div class="breadcrumbs" id="breadcrumbs">

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="backstage/home">主页</a>
            </li>
            <li>
                管理员列表
            </li>
        </ul><!-- .breadcrumb -->
    </div>

    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div class="page-header">
                    <h1>
                        管理员列表
                         <span class="pull-right">
                    <button class="btn btn-primary"
                            onclick="javascript:window.location.href='{{asset('')}}backstage/administrators/add';">
                        添加管理员
                    </button>
                        </span>
                    </h1>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <div class="table-responsive">
                            <table id="sample-table-2" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>
                                        用户名
                                    </th>
                                    <th>邮箱</th>
                                    <th>角色管理</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($admins as $admin)
                                    <tr>
                                        <td>{{$admin->id}}</td>
                                        <td>
                                            {{$admin->username}}
                                        </td>
                                        <td>{{$admin->email}}</td>
                                        <td>
                                            @if($admin->is_super_administrator != 1)
                                                <a href="backstage/administrators/add-role/{{$admin->id}}">
                                                    <button class="btn btn-minier btn-yellow">修改角色</button>
                                                </a>
                                            @endif
                                        </td>
                                        <td>
                                            <ul class="nav-pills" style="list-style-type:none">
                                                <li class="dropdown all-camera-dropdown">
                                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                                        <span id="app_users_selections_operation_1">操作</span>
                                                        <b class="caret"></b></a>
                                                    <ul class="dropdown-menu">

                                                        <li data-filter-camera-type="Zed">
                                                            <a href="backstage/administrators/update/{{$admin->id}}">
                                                                <span id="app_users_selections_modify_1">编辑</span>
                                                            </a>
                                                        </li>
                                                        @if($admin->is_super_administrator != 1)
                                                            <li data-filter-camera-type="Zed">
                                                                <a href="backstage/administrators/delete/{{$admin->id}}" onclick="return confirm('确认删除吗？');">
                                                                    <span id="app_users_selections_delete_1">删除</span>
                                                                </a>
                                                            </li>
                                                        @endif
                                                    </ul>
                                                </li>
                                            </ul>
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div><!-- /.col -->
                </div>
            </div><!-- /row -->
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
    </div><!-- /.page-content -->
@stop
@section('script')
@stop